package cc.wanforme.st.server.base.service;

import cc.wanforme.st.server.base.entity.Permission;
import cc.wanforme.st.server.vo.base.PermissionTreeVo;
import cc.wanforme.st.server.vo.base.PermissionVo;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wanne
 * @since 2022-03-02
 */
public interface IPermissionService extends IService<Permission> {

	Permission saveVo(PermissionVo permission);
	
	void updateVo(PermissionVo permission);
	
	void deleteVo(String id);
	
	PageInfo<PermissionVo> searchPermissions(int page, int pageSize, String permission, String description);
	
	Permission getByPermissionCode(String code);
	
	/** 所有权限，树形结构 */
	List<PermissionTreeVo> permissionTree();
}
